-
Notifications
You must be signed in to change notification settings - Fork 378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New inflow #911
base: master
Are you sure you want to change the base?
New inflow #911
Conversation
Pull Request Test Coverage Report for Build 5763
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you checked the performance of manually adding each vehicle vs specifiying an inflow? Seems like it could cause significantly more traci calls?
Otherwise, seems fine. I think this will be really useful.
accel += np.random.normal(0, self.accel_noise) | ||
if self.ignore_noise is None: | ||
# Add noise to the vehicle for all positions in this case. | ||
accel += np.random.normal(0, self.accel_noise) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
realized that this should probably be seeded with SUMO seed as well.
edge=self._inflows[name]["edge"], | ||
pos=0, | ||
lane=self._inflows[name]["departLane"], | ||
speed=depart_speed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how does this work if adding a vehicle at the beginning of the lane with the given depart_speed is unsafe? Does it have the same behavior as SUMO inflows (either wait, adapt, or throw away the existing vehicle)?
@@ -13,6 +13,8 @@ | |||
from bisect import bisect_left | |||
import itertools | |||
from copy import deepcopy | |||
import random |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above, we should sync the seeds to get reproducibility
name = names[i + 1] | ||
|
||
# Choose the departure speed. | ||
depart_speed = self._inflows[name]["departSpeed"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this also be adaptive?
else 0) | ||
) | ||
|
||
for veh_num in range(num_vehicles): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
at each time step, we should shuffle the vehicles to be added so they're not added in batches (i.e. 5 humans, then 2 avs)
Pull request information
Description
ignore_noise
option to the controllers to deactivate noise near the start of networksVehicleParams
class. This gives us more control on how vehicles enter the network.ignore_noise
feature.